package com.gg.user.gguser.controller;


import com.gg.user.gguser.service.GgRemarksService;
import org.apache.ibatis.annotations.Insert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/remarks")
public class GgRemarksController {

    @Autowired
    private GgRemarksService ggRemarksService;

    /**
     * 增加备注 非必传 required 为false
     */
    @PostMapping("/addGgRemarks")
    public Object addGgRemarks(HttpServletResponse response, HttpServletRequest request,@RequestParam(name = "count" ,required = true) String count, @RequestParam(name = "token" ,required = true) String token,Integer type){
        return ggRemarksService.addGgRemarks(response, request, count, token,type);
    }

    /**
     * 备注查询
     */
    @PostMapping("/getGgRemarkAll")
    public Object getGgRemarkAll(HttpServletResponse response, HttpServletRequest request, String token){
        return ggRemarksService.getGgRemarkAll(response, request, token);
    }

}
